import time
f = open("m1_sorted.txt")
a = [int(i) for i in f]
start = time.time()
for i in range(len (a)-1):
    for g in range (len (a)-2, i-1,-1):
        if a[g]>a[g+1]:
            a[g], a[g+1] = a[g+1], a[g]
finish = time.time()
print("m1_sorted ", round((finish - start)*1000), "milliseconds")


f = open("m2_reverse.txt")
a = [int(i) for i in f]
start = time.time()
for i in range(len (a)-1):
    for g in range (len (a)-2, i-1,-1):
        if a[g]>a[g+1]:
            a[g], a[g+1] = a[g+1], a[g]
finish = time.time()
print("m1_sorted ", round((finish - start)*1000), "milliseconds")


f = open("m3_shuffle.txt")
a = [int(i) for i in f]
start = time.time()
for i in range(len (a)-1):
    for g in range (len (a)-2, i-1,-1):
        if a[g]>a[g+1]:
            a[g], a[g+1] = a[g+1], a[g]
finish = time.time()
print("m1_sorted ", round((finish - start)*1000), "milliseconds")